package a.f.g.a;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class rb
  implements nc
{
  private List b = new ArrayList();
  public static boolean c;
  
  public void a(a_ parama_)
  {
    this.b.add(parama_);
  }
  
  public void b(a_ parama_)
  {
    int i = this.b.indexOf(parama_);
    if (!xb.r)
    {
      if (i < 0) {
        return;
      }
      this.b.remove(i);
    }
  }
  
  public void a()
  {
    this.b.clear();
  }
  
  public List b()
  {
    return Collections.unmodifiableList(this.b);
  }
  
  public y a(cb paramcb, bb parambb, f paramf)
  {
    boolean bool = xb.r;
    int j = xb.q;
    pb localpb = new pb();
    int i = 0;
    do
    {
      if (i >= this.b.size()) {
        break;
      }
      a_ locala_ = (a_)this.b.get(i);
      localpb.a();
      if (!bool)
      {
        if (j != 0) {
          break label93;
        }
        paramf.a(locala_.a(paramcb, parambb, localpb));
        i++;
      }
    } while (j == 0);
    label93:
    return paramf;
  }
  
  public static class b_
    extends rb.a_
  {
    protected y d;
    protected y e;
    protected double f;
    protected double g;
    protected double h;
    protected double i;
    protected double j;
    protected double k;
    public static int l;
    
    public void a(y paramy1, y paramy2)
    {
      this.d = paramy1;
      this.e = paramy2;
      this.g = (paramy2.d() - paramy1.d());
      this.h = (paramy2.f() - paramy1.f());
      this.f = Math.sqrt(this.g * this.g + this.h * this.h);
      this.i = (this.h / this.f);
      this.j = (-this.g / this.f);
    }
    
    public double e()
    {
      return this.k;
    }
    
    public void a(double paramDouble)
    {
      this.k = paramDouble;
    }
    
    public b_(y paramy1, y paramy2, double paramDouble)
    {
      this(paramy1, paramy2, paramDouble, true);
    }
    
    protected b_(y paramy1, y paramy2, double paramDouble, boolean paramBoolean)
    {
      super();
      a(paramy1, paramy2);
      this.k = paramDouble;
    }
    
    public y a(cb paramcb, bb parambb, f paramf)
    {
      boolean bool = xb.r;
      y localy = paramcb.a();
      double d1 = localy.d() - this.d.d();
      double d2 = localy.f() - this.d.f();
      double d3 = (d1 * this.h - d2 * this.g) / this.f;
      if (!bool) {
        if (!this.b) {
          d3 -= paramcb.l();
        }
      }
      if (((bool) || (d3 <= this.k)) && ((bool) || (d3 > 0.001D))) {
        if (!bool)
        {
          if ((localy.d() - this.e.d()) * this.j - (localy.f() - this.e.f()) * this.i >= 0.0D) {
            if (bool) {
              break label245;
            }
          }
        }
        else {
          if ((localy.d() - this.d.d()) * this.j - (localy.f() - this.d.f()) * this.i <= 0.0D) {
            break label237;
          }
        }
      }
      return paramf;
      label237:
      label245:
      double d4 = 1.0D - d3 / this.k;
      double d5 = this.i * d4;
      double d6 = this.j * d4;
      paramf.b(this.b ? -d5 : d5);
      paramf.d(this.b ? -d6 : d6);
      paramf.e(0.0D);
      return paramf;
    }
  }
  
  public static class d_
    extends rb.c_
  {
    public static int h;
    
    public d_() {}
    
    public d_(y paramy, double paramDouble)
    {
      super(paramDouble);
    }
    
    public d_(y paramy, double paramDouble, boolean paramBoolean)
    {
      super(paramDouble, paramBoolean);
    }
    
    public d_(boolean paramBoolean)
    {
      super();
    }
    
    public y a(cb paramcb, bb parambb, f paramf)
    {
      boolean bool = xb.r;
      y localy = paramcb.a();
      double d1 = this.d.d() - localy.d();
      double d2 = this.d.f() - localy.f();
      double d3 = d1 * d1 + d2 * d2;
      if (this.b)
      {
        d4 = Math.sqrt(d3);
        if (bool) {
          break label120;
        }
        if (xb.q == 0) {}
      }
      else
      {
        d4 = Math.sqrt(d3) - paramcb.l();
      }
      double d4 = Math.max(d4, 0.001D);
      label120:
      if (!bool)
      {
        if (d4 <= this.e) {
          if (bool) {
            break label159;
          }
        }
      }
      else {
        if (d4 >= 0.001D) {
          break label144;
        }
      }
      return paramf;
      label144:
      label159:
      double d5 = d3 / (this.e * this.e * 4.0D);
      double d6 = Math.exp(-d5) * d5;
      double d7 = d1 / d4 * d6;
      double d8 = d2 / d4 * d6;
      paramf.b(this.b ? d7 : -d7);
      paramf.d(this.b ? d8 : -d8);
      paramf.e(0.0D);
      return paramf;
    }
  }
  
  public static class e_
    extends rb.c_
  {
    public static boolean h;
    
    public e_() {}
    
    public e_(y paramy, double paramDouble)
    {
      super(paramDouble);
    }
    
    public e_(boolean paramBoolean)
    {
      super();
    }
    
    public e_(y paramy, double paramDouble, boolean paramBoolean)
    {
      super(paramDouble, paramBoolean);
    }
    
    public y a(cb paramcb, bb parambb, f paramf)
    {
      boolean bool = xb.r;
      y localy = paramcb.a();
      double d1 = this.d.d() - localy.d();
      double d2 = this.d.f() - localy.f();
      if (this.b)
      {
        d3 = Math.sqrt(d1 * d1 + d2 * d2);
        if (bool) {
          break label125;
        }
        if (xb.q == 0) {}
      }
      else
      {
        d3 = Math.sqrt(d1 * d1 + d2 * d2) - paramcb.l();
      }
      double d3 = Math.max(d3, 0.001D);
      label125:
      if (!bool)
      {
        if (d3 <= this.e) {
          if (bool) {
            break label157;
          }
        }
      }
      else {
        if (d3 >= 0.001D) {
          break label149;
        }
      }
      return paramf;
      label149:
      label157:
      double d4 = 1.0D - d3 / this.e;
      double d5 = d1 / d3 * d4;
      double d6 = d2 / d3 * d4;
      paramf.b(this.b ? d5 : -d5);
      paramf.d(this.b ? d6 : -d6);
      paramf.e(0.0D);
      return paramf;
    }
  }
  
  public static abstract class c_
    extends rb.a_
  {
    protected y d;
    protected double e;
    private static final int f = 150;
    public static int g;
    
    protected c_()
    {
      this(new pb(), 150.0D);
    }
    
    protected c_(y paramy, double paramDouble)
    {
      this(paramy, paramDouble, true);
    }
    
    protected c_(y paramy, double paramDouble, boolean paramBoolean)
    {
      super();
      this.d = paramy;
      this.e = paramDouble;
    }
    
    protected c_(boolean paramBoolean)
    {
      super();
    }
    
    public y e()
    {
      return this.d;
    }
    
    public void a(y paramy)
    {
      this.d = paramy;
    }
    
    public double f()
    {
      return this.e;
    }
    
    public void a(double paramDouble)
    {
      this.e = paramDouble;
    }
  }
  
  public static abstract class a_
    implements nc
  {
    protected boolean b = true;
    public static int c;
    
    protected a_() {}
    
    protected a_(boolean paramBoolean)
    {
      this.b = paramBoolean;
    }
    
    void a()
    {
      this.b = true;
    }
    
    void b()
    {
      this.b = false;
    }
    
    boolean c()
    {
      return this.b;
    }
    
    boolean d()
    {
      if (!xb.r) {}
      return !this.b;
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.g.a.rb
 * JD-Core Version:    0.7.0.1
 */